﻿<%@ Page Language="C#" MasterPageFile="~/Police/Police.master" AutoEventWireup="true"
    CodeFile="TransfeSoldier.aspx.cs" Inherits="Police_TransfeSoldier" Title="无标题页"
    StylesheetTheme="Content" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        function ReturnFun() {
            history.back(0);
        }
        function OpenWin(url) {
            var h = 480;
            var w = 640;
            var t = (screen.height - h) / 2;
            var l = (screen.width - w) / 2;
            window.open(url, null, 'left=' + l + ",top=" + t + ",width=" + w + ",height=" + h + ",toolbar=yes,scrollbars=yes,status=yes");
        }
    </script>

    <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="100%">
        <span><a onclick="ReturnFun()" style="cursor: pointer; color: OrangeRed">&lt;&lt;返回</a></span>
        <caption>
            <span>士兵调动</span></caption>
        <tr>
            <td>
                <table border="0" cellpadding="4" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            姓名：
                        </td>
                        <td>
                            <asp:Label ID="SoldierName" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                        <td>
                            性别：
                        </td>
                        <td>
                            <asp:Label ID="Sex" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                        <td rowspan="8">
                            <asp:Image ID="imgPhoto" runat="server" Width="160" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            士兵证号：
                        </td>
                        <td>
                            <asp:Label ID="CardID" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                        <td>
                            警衔：
                        </td>
                        <td>
                            <asp:Label ID="RankName" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            职务：
                        </td>
                        <td>
                            <asp:Label ID="DutyName" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                        <td>
                            籍贯：
                        </td>
                        <td>
                            <asp:Label ID="NationName" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            入伍时间：
                        </td>
                        <td>
                            <asp:Label ID="JoinDate" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                        <td>
                            出生日期：
                        </td>
                        <td>
                            <asp:Label ID="Birthday" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            专业：
                        </td>
                        <td>
                            <asp:Label ID="SpecialityName" runat="server" CssClass="labelBlod"></asp:Label>
                        </td>
                        <td>
                            <%--<asp:HyperLink ID="hlSoldierDetails" runat="server" Text=""></asp:HyperLink>--%>
                            <a href="javascript:OpenWin('../BasicBase/SoldierArchive/SoldierView1.aspx?RootMenuID=200000&ID=<%=GetSoldierID() %>');">
                                详细信息</a>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            现单位：<asp:Label ID="DepartmentName" runat="server" CssClass="labelBlod"></asp:Label></asp:Label>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="100%">
                <caption>
                    <span>调动信息</span></caption>
                <tr>
                    <td style="padding: 0; margin: 0">
                        <table border="0" cellpadding="4" style="padding: 0; margin: 0" cellspacing="0" width="96%">
                            <tr>
                                <td valign="top">
                                    <asp:RadioButton ID="RadioButton1" runat="server" ForeColor="OrangeRed" Text="部队内部调动"
                                        AutoPostBack="True" Checked="True" GroupName="Soldiertype" OnCheckedChanged="RadioButton1_CheckedChanged" />
                                </td>
                                <td>
                                    <asp:RadioButton ID="RadioButton3" runat="server" AutoPostBack="True" GroupName="Soldiertype"
                                        OnCheckedChanged="RadioButton1_CheckedChanged" ForeColor="OrangeRed" Text="调出到外单位" />
                                </td>
                                <td>
                                    <asp:RadioButton ID="RadioButton4" runat="server" AutoPostBack="True" GroupName="Soldiertype"
                                        OnCheckedChanged="RadioButton1_CheckedChanged" ForeColor="OrangeRed" Text="退役" />
                                </td>
                    </td>
                    <td valign="top">
                        &nbsp;
                    </td>
                    <td valign="top">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:Panel ID="Panel1" runat="server">
                            <table width="96%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        &nbsp;调出单位：
                                    </td>
                                    <td>
                                        <asp:Label runat="server" ID="lblOldDepartmentName"></asp:Label>
                                        <asp:Label runat="server" ID="lblOldDepartmentID" Visible="False"></asp:Label>
                                    </td>
                                    <td style="width: 120px">
                                        调入单位：
                                    </td>
                                    <td align="left">
                                        <asp:DropDownList ID="DepartmentList" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" align="right">
                                        <br />
                                        <asp:Button ID="btnTransfer" runat="server" Text="调动" OnClick="btnTransfer_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="Panel3" runat="server">
                            <table width="96%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        &nbsp;调入单位：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtDRDepartment" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;军种：
                                    </td>
                                    <td>
                                        <asp:RadioButtonList ID="rblDCJingZhong" runat="server" RepeatDirection="Horizontal">
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td colspan="3" align="right">
                                        <asp:Button ID="btnTransOut" runat="server" OnClick="btnTransOut_Click" Text="调出" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" align="right">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="Panel4" runat="server">
                            <table width="96%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="padding: 2px;">
                                        &nbsp; 批准人：<asp:TextBox ID="txtApprover" runat="server" Width="58px"></asp:TextBox>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;调动时间：<asp:TextBox
                                            ID="txtTransfeDate" runat="server" Width="78px"></asp:TextBox>
                                        <ajaxToolkit:CalendarExtender ID="defaultCalendarExtender" runat="server" Animated="False"
                                            Format="yyyy-MM-dd" TargetControlID="txtTransfeDate" Enabled="True">
                                        </ajaxToolkit:CalendarExtender>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTransfeDate"
                                            ErrorMessage="*"></asp:RequiredFieldValidator>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 报到时间：<asp:TextBox
                                            ID="txtReportDate" runat="server" Width="78px"></asp:TextBox>
                                        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" Animated="False"
                                            Format="yyyy-MM-dd" TargetControlID="txtReportDate" Enabled="True">
                                        </ajaxToolkit:CalendarExtender>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtReportDate"
                                            ErrorMessage="*"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                            </table>
                            <table width="96%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        <asp:RadioButtonList ID="tyType" runat="server" RepeatDirection="Horizontal">
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td align="right">
                                        <asp:Button ID="btnTransOut1" runat="server" OnClick="btnTransOut1_Click" Text="退役" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="right">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
            </td> </tr> </table>
            <asp:Label ID="lblInfo" runat="server" ForeColor="#FF8000"></asp:Label><br />
            <asp:GridView ID="gvTransfer" runat="server" AutoGenerateColumns="False" Caption="<span>调动记录</span>"
                DataKeyNames="TransferID,ToUnitID" OnRowDeleting="gvTransfer_RowDeleting" OnRowDataBound="gvTransfer_RowDataBound">
                <Columns>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Left">
                        <HeaderStyle Width="30px" HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="FromUnit" HeaderText="调出单位" />
                    <asp:BoundField DataField="ToUnit" HeaderText="调入单位" />
                    <asp:BoundField DataField="TransferDate" DataFormatString="{0:yy-MM-dd}" HeaderText="调动时间" />
                    <asp:BoundField DataField="Approver" HeaderText="批准人" />
                    <asp:BoundField DataField="SetUserName" HeaderText="操作员" />
                    <asp:BoundField DataField="SetTime" DataFormatString="{0:yy-MM-dd}" HeaderText="操作时间" />
                    <asp:TemplateField ShowHeader="False" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:ImageButton ID="delteImage" ToolTip="删除" ImageUrl="~/Images/delete.gif" OnClientClick="return confirm('您确认删除此调动记录吗？')"
                                CommandName="Delete" runat="server" CausesValidation="false" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle HorizontalAlign="Left" />
                <RowStyle HorizontalAlign="Left" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="head">
</asp:Content>
